package com.quan.mall.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;


import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import javax.validation.constraints.NotNull;
import com.quan.commons.core.bean.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 财务-资金流水
 *
 * @author yhaoquan
 * @email yhaoquan@163.com
 * @date 2021-03-26 15:19:14
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("fms_finance_cash_flow")
public class FmsFinanceCashFlow extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
    @TableId
    private Long id;

	/**
	 * APPID
	 */
    private String appId;

	/**
	 * 商户号
	 */
    private String mchId;

	/**
	 * OPENID
	 */
    private String openId;

	/**
	 * 会员ID
	 */
    private Long memberId;

	/**
	 * 会员名称
	 */
    private String memberName;

	/**
	 * 订单ID
	 */
    private Long orderId;

	/**
	 * 订单编号
	 */
    private String orderSn;

	/**
	 * 申请退款订单ID
	 */
    private Long refundId;

	/**
	 * 申请退款订单编号
	 */
    private String refundSn;

	/**
	 * 下单商品ID
	 */
    private Long goodsId;

	/**
	 * 订单商品SkuID
	 */
    private Long goodsSkuId;

	/**
	 * 微信支付交易订单号
	 */
    private String transactionId;

	/**
	 * 交易类型：1->订单支付，2->退款订单，3->会员升级，4->会员充值
	 */
    private Integer transactionType;

	/**
	 * 收支金额（收：100，支：-100）
	 */
    private BigDecimal amount;

	/**
	 * 备注
	 */
    private String remarks;

	/**
	 * 附加信息
	 */
    private String extraJson;

	/**
	 * 创建时间
	 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime ctime;


}
